package department.fc.common;

import java.util.HashMap;
import java.util.Map;

public class AttributeAndView {

	private boolean redirect;
	private String url;
	
	private Map<String, Object> attributes;

	public boolean isRedirect() {
		return redirect;
	}

	public void setRedirect(boolean redirect) {
		this.redirect = redirect;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Override
	public String toString() {
		return "AttributeAndView [redirect=" + redirect + ", url=" + url
				+ ", attributes=" + attributes + "]";
	}

	public Map<String, Object> getAttributes() {
		return attributes;
	}

	public void setAttributes(Map<String, Object> attributes) {
		this.attributes = attributes;
	}


	public AttributeAndView(boolean redirect, String url) {
		super();
		this.redirect = redirect;
		this.url = url;
	}

	public AttributeAndView(boolean redirect) {
		super();
		this.redirect = redirect;
	}

	public AttributeAndView() {
		super();
	}
	
	
	public AttributeAndView(boolean redirect, String url, Map<String, Object> attribute){
		this.redirect = redirect;
		this.url = url;
		this.attributes = attributes;
		
	}
	
	public AttributeAndView(boolean redirect, String url, String name, Object value){
		this.redirect = redirect;
		this.url = url;
		attributes = new HashMap<String, Object>();
		attributes.put(name, value);
	}
	
	
	
	

}
